module.exports = app => {
    const mongoose = app.mongoose;
    mongoose.pluralize(null)
    const Schema = mongoose.Schema;
    const GoodsEvalSchema = new Schema({
        userId: { ref: "Userinfo", required: true, type: mongoose.Types.ObjectId },
        orderId: {
            type: String,
            required: true
        },
        goodsId: {
            type: String,
            required: true
        },
        rate: {
            type: Number,
            required: true
        },
        content: {
            type: String
        },
        image: {
            type: String,
            required: true
        },
        name: {
            type: String,
            required: true
        },
        imgFiles: {
            type: [String]
        },
        isShow: {
            type: Boolean,
            default: false
        }
    }, { versionKey: false, timestamps: true })
    return mongoose.model("GoodsEval", GoodsEvalSchema)
}